-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(imaging): add ability to search imaging requests #2522
base: master
Are you sure you want to change the base?
feat(imaging): add ability to search imaging requests #2522
Conversation
Added filter dropdown and search textbox for imagings table view. No functionality yet.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/5vx92g037 |
<SelectWithLabelFormGroup | ||
name="type" | ||
label={t('imagings.filterTitle')} | ||
options={filterOptions} | ||
defaultSelected={filterOptions.filter(({ value }) => value === searchFilter)} | ||
onChange={(values) => setSearchFilter(values[0] as ImagingFilter)} | ||
isEditable | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add the following tests related to this field:
- make sure that it gets rendered on the page
- make sure that when its value changes that it performs a search
<TextInputWithLabelFormGroup | ||
name="searchbox" | ||
label={t('imagings.search')} | ||
placeholder={t('imagings.searchPlaceholder')} | ||
value={searchText} | ||
isEditable | ||
onChange={onSearchBoxChange} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add the following tests related to this field:
- make sure that it gets rendered on the page
- make sure that when its value changes that it performs a search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be all set once the requested tests have been added.
…om/FanciestW/hospitalrun-frontend into feature-2491-imaging-search-filter
@blestab @jackcmeyer I finished added the tests for the filter and search components in the imaging search view. I used the ViewLabs.test.tsx I noticed that in the LabsView tests, it checks that the search is called 1 time. But for my test it consitently calls the search function 2 times. I'm not sure if I implemented the search and filter incorrectly or if I set up the tests incorrectly. I would imagine the search is called once when the table is first populated with the default search/filter parameters. Then one more time when I add a filter/search parameter. Let me know what you think. Thank you very much! Happy Holidays 🎄 🥳 |
…om/FanciestW/hospitalrun-frontend into feature-2491-imaging-search-filter
Fixes #2491.
Changes proposed in this pull request:
Newly added dependencies with Bundlephobia links:*
Note: pull requests without proper descriptions may simply be closed without further discussion. We appreciate your contributions, but need to know what you are offering in clearly described format. Provide tests for all code that you add/modify. If you add/modify any components update the storybook. Thanks! (you can delete this text)